HTTP Request
This method allows you to send SMS message over the HTTP protocol. This way your IceWarp Server can be used as a remote SMS gateway, which gives you infinite options to extend any web applications by SMS functionality, while the receiving, archiving, processing and sending is all taken care of by IceWarp Server. Server-side processing can be extended by the means of Rules and Executable accounts.
Basic format of the HTTP request (for an instance of IceWarp Server) is:
http://<YourDomain>/sms/?number=<number>&data=<message>
Authenticated format of the protocol is:
http://<YourDomain>/sms/?number=<number>&data=<message>&user=<username>&pass=<password>
Where:
<number> - is the cellular number of the receiving mobile device. You can use the %number% server variable here.
Also the following format is supported: %number;interprefix=<val>%. If this option is used and the number starts with "+" , the "+" is changed to <val>.
e.g.: num=%number;interprefix=00%
and the number is +4205452544
it will get: num=004205452544
<message> - is the message you want to send. You can use the %data% server variable here.
<username> - is a valid username for authentication. Only required if authentication is active.
<password> - is the valid password associated with the username. Only required if authentication is active.
The full format of the HTTP request (for an instance of IceWarp Server) with all optional parameters is:
http://<YourDomain>/sms/?number=<number>&data=<message>&user=<username>&pass=<password>&maxmsgs=<N>&binary=<bin>&udh=<udh>&pid=<pid>&dcs=<dcs>&sender=<sender>&authenticated=<authenticated>&reply=<reply>&id=<ID>
See the Available Parameters chapter for details.
Note: The above example is only valid for an instance of IceWarp Server (local or remote). If you are configuring an SMS gateway for use with a service of an external SMS gateway or provider, you should modify the URL data according to your providers requirements. The example shows a remote Clickatell gateway used to deliver messages through an external server, please read on for details.
HTTP Request Examples
- http://<YourDomain>/sms/?number=+15551234567&data="hello world"
sends the message "hello world" to number +15551234567
- http://<YourDomain>/sms/?number=+15551234567&data="hello world"&user=john&pass=johnpwd
sends the message "hello world" to number +15551234567 using authentication
- http://smsc5.routotelecom.com/SMSsend?user=xxxx&pass=xxxxx&number=%number%&message=%data%&type=LongSMS&ownnum=mysenderid
sends concatenated message over routemossaging.com's gateway using custom Sender ID (if supported by the carrier)